var mongoose = require("mongoose");
mongoose.Promise = global.Promise;
mongoose.set('useCreateIndex', true) 
let optionUser = {
	"userName":"",
	"psw":""
	}
mongoose.connect(`mongodb://${optionUser.userName}:${optionUser.psw}@127.0.0.1:27017/FirstName_lastName_lab4`,{ useNewUrlParser: true });
var cn = mongoose.connection;
cn.on("open",function(){
    console.log("success");
});
cn.on("error",function(){
    console.log("error");
});
module.exports = mongoose;